﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Com.OpenCode.DwgConvert.Model
{
    /// <summary>
    /// 文件转换接口
    /// </summary>
    public interface IDataConvert
    {
        /// <summary>
        /// 任务类型
        /// </summary>
        TaskType TaskType { get; }

        /// <summary>
        /// 任务状态
        /// </summary>
        TaskStatus TaskStatus { get; }

        /// <summary>
        /// 任务的描述信息
        /// </summary>
        string Description { get; }

        /// <summary>
        /// 任务名称
        /// </summary>
        string Name { get; }

        /// <summary>
        ///输入的数据源
        /// </summary>
        TaskDatasource InputDatasource { get; set; }

        /// <summary>
        /// 输出的数据源
        /// </summary>
        TaskDatasource OutputDatasource { get; set; }

        /// <summary>
        /// 转换参数接口
        /// </summary>
        IConvertParams ConvertParams { get; set; }

        /// <summary>
        /// 日志接口
        /// </summary>
        IDataConvertLog DataConvertLog { get; }

        /// <summary>
        /// 获取或设置绑定的对象
        /// 改对象的目的是用来绑定对应的展示层ui
        /// </summary>
        object Binding { get; set; }

        /// <summary>
        /// 检查前事件
        /// </summary>
        event DataConvertDelegate BeforeCheck;

        /// <summary>
        /// 检查完成事件
        /// </summary>
        event DataConvertDelegate AfterCheck;

        /// <summary>
        /// 检查中事件
        /// </summary>
        event DataConvertProcessDelegate Checking;

        /// <summary>
        /// 转换前事件
        /// </summary>
        event DataConvertDelegate BeforeConvert;

        /// <summary>
        /// 转换完成事件
        /// </summary>
        event DataConvertDelegate AfterConvert;

        /// <summary>
        /// 转换中事件
        /// </summary>
        event DataConvertProcessDelegate Converting;

        /// <summary>
        /// 检查数据转换任务
        /// 检查输入输出数据源准确性
        /// 统计数据总数等
        /// </summary>
        void Check();

        /// <summary>
        /// 开始转换
        /// </summary>
        void Convert();
    }
}
